<!DOCTYPE html>
<html>
<head>
    <title>测试上传功能</title>
    <script src="https://cdn.jsdelivr.net/npm/jquery@3.7.0/dist/jquery.min.js"></script>
</head>
<body>
    <h1>测试上传功能</h1>
    
    <div id="uploadArea" style="border: 2px dashed #ccc; padding: 20px; cursor: pointer; margin: 20px 0;">
        点击选择文件或拖拽文件到此处
    </div>
    
    <input type="file" id="fileInput" style="display: none;" accept=".tif,.tiff,.png,.jpg,.jpeg">
    
    <div id="result"></div>
    
    <script>
        $(document).ready(function() {
            console.log('页面加载完成');
            
            $('#uploadArea').on('click', function() {
                console.log('点击上传区域');
                $('#fileInput').click();
            });
            
            $('#fileInput').on('change', function(e) {
                console.log('文件选择变化');
                const file = e.target.files[0];
                if (file) {
                    $('#result').html(`选择的文件: ${file.name}<br>大小: ${file.size} bytes<br>类型: ${file.type}`);
                }
            });
        });
    </script>
</body>
</html>
